import time
import unittest

from selenium import webdriver
from Page import Page
from ddt import ddt,file_data
@ddt
class TestCase(unittest.TestCase):
    #测试固件
    def setUp(self) -> None:
        self.driver=webdriver.Firefox()
        self.driver.maximize_window()
    def tearDown(self) -> None:
        time.sleep(10)
        self.driver.quit()
    @file_data('login.yaml')
    def test_01(self,yhm,mm):
        po=Page(self.driver)
        po.open_url('http://localhost:8080/userlogin')
        po.username(yhm)
        po.password(mm)
        po.login_btn()
        po.queren()
if __name__ == '__main__':
    unittest.main()